//package com.lyEducation.security.config;
//
//import org.springframework.security.access.AccessDecisionManager;
//import org.springframework.security.access.AccessDeniedException;
//import org.springframework.security.access.ConfigAttribute;
//import org.springframework.security.authentication.InsufficientAuthenticationException;
//import org.springframework.security.core.Authentication;
//import org.springframework.stereotype.Component;
//
//import java.util.Collection;
//@Component
//public class SecurityAccessDecisionManager implements AccessDecisionManager {
//    @Override
//    public void decide(Authentication authentication, Object o, Collection<ConfigAttribute> collection) throws AccessDeniedException, InsufficientAuthenticationException {
//
//        throw new SecurityAuthenticationException("身份校验错误");
//
////        throw new SecurityAccessDeniedException("权限校验错误");
//    }
//
//    @Override
//    public boolean supports(ConfigAttribute configAttribute) {
//        return false;
//    }
//
//    @Override
//    public boolean supports(Class<?> aClass) {
//        return false;
//    }
//}
